package com.macrounion.atv.service.service.impl;

import java.util.List;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.macrounion.atv.service.entity.ProtocolC;
import com.macrounion.atv.service.mapper.ProtocolCMapper;
import com.macrounion.atv.service.mapper.ProtocolCMapperExt;
import com.macrounion.atv.service.service.ProtocolCService;
import com.macrounion.base.service.service.impl.BaseServiceImpl;

@Service
public class ProtocolCServiceImpl extends BaseServiceImpl<ProtocolCMapper, ProtocolC> implements ProtocolCService {
    @Autowired
    private ProtocolCMapperExt protocolCMapperExt;

    @Override
    public List<ProtocolC> getByProtocolId(String pid) {
        return protocolCMapperExt.getByProtocolId(pid);
    }

    @Override
    public int deleteRows(List<String> ids) {
        return protocolCMapperExt.deleteRows(ids);
    }

    @Override
    public int saveProtocols(List<ProtocolC> protocolCS) {
        return protocolCMapperExt.saveProtocolCs(protocolCS);
    }

    @Override
    public int getCountByMid(String mid, String protocolId) {
        return protocolCMapperExt.getCountByMid(mid, protocolId);
    }

    @Override
    public int getCountByChannelCode(String channelCode, String protocolId) {
        return protocolCMapperExt.getCountByChannelCode(channelCode, protocolId);
    }

    @Override
    public int deleteByProtocolId(String protocolId) {
        return protocolCMapperExt.deleteByProtocolId(protocolId);
    }

    @Override
    public String getMaxChannelCodeByProtocolId(String protocolId, Integer trap) {
        return protocolCMapperExt.getMaxChannelCodeByProtocolId(protocolId, trap);
    }

    @Override
    public String getNameByChannelCodeNPid(String channelCode, String protocolId) {
        return protocolCMapperExt.getNameByChannelCodeNPid(channelCode, protocolId);
    }

    @Override
    public int updateTranslate(ProtocolC protocolC) {
        return protocolCMapperExt.updateTranslate(protocolC);
    }
}